home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 203_01 / ymodem.doc < prev   
Encoding:
Text File  |  1980-01-01  |  43.6 KB  |  1,460 lines

  1.  
  2.  
  3.  
  4.                                   - 1 -
  5.  
  6.  
  7.  
  8.                      XMODEM/YMODEM PROTOCOL REFERENCE
  9.                  A compendium of documents describing the
  10.                             XMODEM and YMODEM
  11.                          file transfer Protocols
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.                          Edited by Chuck Forsberg
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.                  Please distribute as widely as possible.
  39.  
  40.                        Questions to Chuck Forsberg
  41.  
  42.  
  43.  
  44.  
  45.  
  46.                            Omen Technology Inc
  47.                         17505-V Sauvie Island Road
  48.                           Portland Oregon 97231
  49.                            Voice: 503-621-3406
  50.             Modem (Telegodzilla): 503-621-3746 Speed 1200,300
  51.                           Compuserve: 70715,131
  52.                     UUCP: ...!tektronix!reed!omen!caf
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61. XMODEM/YMODEM Protocol Reference                                         1
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                                   - 2 -
  71.                                                                  Chapter 1
  72.  
  73.  
  74. 1.  TOWER OF BABEL ??
  75.  
  76. In the interest of fostering compatibility among communications programs,
  77. part of of the Professional-YAM manual is reproduced here to minimize the
  78. Electronic Tower of Babel.
  79.  
  80. The YMODEM Protocol is supported by the public domain programs YAM (CP/M),
  81. YAM(CP/M-86), YAM(CCPM-86), rb/sb (Unix, Berkeley Unix, Venix, Xenix,
  82. Coherent, IDRIS, Regulus) as well as Professional-YAM.  These programs
  83. have been in use since 1981.
  84.  
  85. The protocols described below are enhancements to Ward Christensen's
  86. XMODEM protocol, and are public domain.
  87.  
  88. The 1k packet length capability described below may be used in conjunction
  89. with the Batch Protocol, or with single file transfers identical to the
  90. XMODEM/CRC protocol except for minimal changes to support 1k packets.
  91.  
  92. To complete this tome, Ward Christensen's original protocol document and
  93. John Byrns's CRC-16 document are included for reference.
  94.  
  95. References to the MODEM or MODEM7 protocol have been changed to XMODEM to
  96. accommodate the vernacular.
  97.  
  98. Watch for an article describing the YMODEM protocol in a more coherent
  99. fashion later this year.  This article will include some interesting
  100. history on the development of file microcomputer file transfers.
  101.  
  102.  
  103. 1.1  Some Messages from the Pioneer
  104.  
  105. #: 130940 S0/Communications 25-Apr-85  18:38:47
  106. Sb: my protocol
  107. Fm: Ward Christensen 76703,302 (EDITED)
  108. To: all
  109.  
  110.  
  111. Be aware the article1 DID quote me correctly in terms of the phrases like
  112. "not robust", etc.
  113.  
  114. It was a quick hack I threw together, very unplanned (like everything I
  115. do), to satisfy a personal need to communicate with "some other" people.
  116.  
  117. ONLY the fact that it was done in 8/77, and that I put it in the public
  118. domain immediately, made it become the standard that it is.
  119.  
  120.  
  121. __________
  122.  
  123.  1. Infoworld April 29 p. 16
  124.  
  125.  
  126.  
  127. 2                           Vsn 13.09 05-05-85              TurboDial 1.02
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                                   - 3 -
  137. Chapter 1
  138.  
  139.  
  140. I think its time for me to
  141.  
  142. (1) document it; (people call me and say "my product is going to include
  143. it - what can I 'reference'", or "I'm writing a paper on it, what do I put
  144. in the bibliography") and
  145.  
  146. (2) propose an "incremental extension" to it, which might take "exactly"
  147. the form of Chuck Forsberg's YAM protocol.  He wrote YAM in C for CP/M and
  148. put it in the public domain, and wrote a batch protocol for Unix called rb
  149. and sb (receive batch, send batch), which was basically XMODEM with
  150.    (a) a record 0 containing filename date time and size
  151.    (b) a 1K block size option
  152.    (c) CRC-16.
  153.  
  154. He did some clever programming to detect false ACK or EOT, but basically
  155. left them the same.
  156.  
  157. People who suggest I make SIGNIFICANT changes to the protocol, such as
  158. "full duplex", "multiple outstanding blocks", "multiple destinations", etc
  159. etc don't understand that the incredible simplicity of the protocol is one
  160. of the reasons it survived to this day in as many machines and programs as
  161. it may be found in!
  162.  
  163. Consider the PC-NET group back in '77 or so - documenting to beat the band
  164. - THEY had a protocol, but it was "extremely complex", because it tried to
  165. be "all things to all people" - i.e. send binary files on a 7-bit system,
  166. etc.  I was not that "benevolent". I (emphasize > I < ) had an 8-bit UART,
  167. so "my protocol was an 8-bit protocol", and I would just say "sorry" to
  168. people who were held back by 7-bit limitations.
  169. ...
  170. Block size: Chuck Forsberg created an extension of my protocol, called
  171. YAM, which is also supported via his public domain programs for UNIX
  172. called rb and sb - receive batch and send batch.  They cleverly send a
  173. "block 0" which contains the filename, date, time, and size.
  174. Unfortunately, its UNIX style, and is a bit weird2 - octal numbers, etc.
  175. BUT, it is a nice way to overcome the kludgy "echo the chars of the name"
  176. introduced with MODEM7.  Further, chuck uses CRC-16 and optional 1K
  177. blocks.  Thus the record 0, 1K, and CRC, make it a "pretty slick new
  178. protocol" which is not significantly different from my own.
  179.  
  180. Also, there is a catchy name - YMODEM.  That means to some that it is the
  181. "next thing after XMODEM", and to others that it is the Y(am)MODEM
  182. protocol.  I don't want to emphasize that too much - out of fear that
  183. other mfgrs might think it is a "competitive" protocol, rather than an
  184.  
  185.  
  186. __________
  187.  
  188.  2. The Unix style stuff (time, file mode) is optional.  The pathname and
  189.     file length may be sent alone if desired.
  190.  
  191.  
  192.  
  193. XMODEM/YMODEM Protocol Reference                                         3
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                                   - 4 -
  203.                                                                  Chapter 1
  204.  
  205.  
  206. "unaffiliated" protocol.  Chuck is currently selling a much-enhanced
  207. version of his CP/M-80 C program YAM, calling it Professional Yam, and its
  208. for the PC - I'm using it right now.  VERY slick!  32K capture buffer,
  209. script, scrolling, previously captured text search, plus built-in commands
  210. for just about everything - directory (sorted every which way), XMODEM,
  211. YMODEM, KERMIT, and ASCII file upload/download, etc.  You can program it
  212. to "behave" with most any system - for example when trying a number for
  213. CIS it detects the "busy" string back from the modem and substitutes a
  214. diff phone # into the dialing string and branches back to try it.
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259. 4                           Vsn 13.09 05-05-85              TurboDial 1.02
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.                                   - 5 -
  269. Chapter 2                                     XMODEM Protocol Enhancements
  270.  
  271.  
  272. 2.  XMODEM PROTOCOL ENHANCEMENTS
  273.  
  274. Professional-YAM uses several compatible extensions and logic enhancements
  275. to the widely used Ward Christensen XMODEM protocol.
  276.  
  277. This chapter discusses the protocol extensions to Ward Christensen's 1982
  278. XMODEM protocol description document.
  279.  
  280. YAM does not ask the operator whether he wishes to keep retrying after 10
  281. attempts have failed to correctly transfer a packet.  Virtually all
  282. correctable errors are corrected within the first few retransmissions.  If
  283. the line is so bad that ten attempts are insufficient, there is a
  284. significant danger of undetected errors.  In that case, it's better to
  285. redial for a better connection.
  286.  
  287.  
  288. 2.1  CAN-CAN Abort
  289.  
  290. YAM recognizes a sequence of two consecutive CAN (Hex 18) characters
  291. without modem errors (overrun, framing, etc.) as a transfer abort
  292. command.1 The check for two consecutive CAN characters virtually
  293. eliminates the possibility of a line hit aborting the transfer.  YAM sends
  294. five CAN characters when it aborts a XMODEM protocol file transfer,
  295. followed by five backspaces to delete the CAN characters from the remote's
  296. keyboard input buffer (in case the remote had already aborted the
  297. transfer).
  298.  
  299.  
  300. 2.2  CRC-16 Option
  301.  
  302. The XMODEM protocol uses an optional two character CRC-16 instead of the
  303. one character arithmetic checksum used by the original protocol and by
  304. most commercial implementations.  CRC-16 guarantees detection of all
  305. single and double bit errors,  all errors with an odd number of error
  306. bits, all burst errors of length 16 or less, 99.9969% of all 17-bit error
  307. bursts, and 99.9984 per cent of all possible longer error bursts.  By
  308. contrast, a double bit error, or a burst error of 9 bits or more can sneak
  309. past the XMODEM protocol arithmetic checksum.
  310.  
  311. The XMODEM/CRC protocol is similar to the XMODEM protocol, except that the
  312. receiver specifies CRC-16 by sending C (Hex 43) instead of NAK when
  313. requesting the FIRST packet.  A two byte CRC is sent in place of the one
  314. byte arithmetic checksum.  YAM's c option to the r command enables CRC-16
  315. in single file reception, corresponding to the original implementation in
  316.  
  317.  
  318. __________
  319.  
  320.  1. This is recognized when YAM is waiting for the beginning of a packet
  321.     or for an acknowledge to one that has been sent.
  322.  
  323.  
  324.  
  325. XMODEM/YMODEM Protocol Reference                                         5
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.                                   - 6 -
  335. XMODEM Protocol Enhancements                                     Chapter 2
  336.  
  337.  
  338. the MODEM7 series programs.  Many commercial communications programs and
  339. bulletin board systems still do not support CRC-16, especially those
  340. written in Basic or Pascal.
  341.  
  342. XMODEM protocol with CRC is accurate provided both sender and receiver
  343. both report a successful transmission.  The protocol is robust in the
  344. presence of characters lost by buffer overloading on timesharing systems.
  345.  
  346. Professional-YAM add several proprietary logic enhancements to XMODEM's
  347. error detection and recovery.  These compatible enhancements eliminate
  348. most of the bad file transfers other programs make when using the XMODEM
  349. protocol under less than ideal conditions.
  350.  
  351.  
  352. 2.3  1024 Byte Packet Option
  353.  
  354. If YAM is sending with the k option, the transmitted packet contains 1024
  355. bytes of data.  An STX (02) replaces the SOH (01) at the beginning of the
  356. transmitted block to notify the receiver of the longer packet length.  The
  357. receiver should be able to accept any mixture of 128 and 1024 byte
  358. packets.  The packet number is incremented by one for each packet.2
  359.  
  360. If 1024 byte packets are being used, it is possible for a 128 byte file to
  361. "grow" to 1024 bytes on CP/M.  This does not waste disk space on CP/M
  362. because the allocation granularity is 1k.  When 1024 byte packets are used
  363. with batch transmission, the file length transmitted in the file name
  364. packet allows the receiver to discard the padding.
  365.  
  366. CRC-16 should be used with the k option to preserve data integrity over
  367. phone lines.  The k option may be used with batch file transmission, or
  368. with single file transmission.
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383. __________
  384.  
  385.  2. The displayed sector number should be the number of bytes divided by
  386.     128.  This maintains a familiar unit of measurement for the progress
  387.     report and avoids ambuguity caused by rollowver of the sector number.
  388.  
  389.  
  390.  
  391. 6                           Vsn 13.09 05-05-85              TurboDial 1.02
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.                                   - 7 -
  401. Chapter 3                                     XMODEM Protocol Enhancements
  402.  
  403.  
  404.           Figure 1.  1024 byte Packets
  405.           SENDER                                  RECEIVER
  406.                                                   "s -k foo.bar"
  407.           "foo.bar open x.x minutes"
  408.                                                   C
  409.           STX 01 FE Data[1024] CRC CRC
  410.                                                   ACK
  411.           STX 02 FD Data[1024] CRC CRC
  412.                                                   ACK
  413.           STX 03 FC Data[1000] CPMEOF[24] CRC CRC
  414.                                                   ACK
  415.           EOT
  416.                                                   ACK
  417.  
  418.           Figure 2.  Mixed 1024 and 128 byte Packets
  419.           SENDER                                  RECEIVER
  420.                                                   "s -k foo.bar"
  421.           "foo.bar open x.x minutes"
  422.                                                   C
  423.           STX 01 FE Data[1024] CRC CRC
  424.                                                   ACK
  425.           STX 02 FD Data[1024] CRC CRC
  426.                                                   ACK
  427.           SOH 03 FC Data[128] CRC CRC
  428.                                                   ACK
  429.           SOH 04 FB Data[100] CPMEOF[28] CRC CRC
  430.                                                   ACK
  431.           EOT
  432.                                                   ACK
  433.  
  434. 3.  YMODEM Batch File Transmission
  435.  
  436. The YMODEM Batch protocol is an extension to the XMODEM/CRC protocol that
  437. allows 0 or more files to be transmitted with a single command.  (Zero
  438. files may be sent if none of the requested files is accessible.) The
  439. design approach of the YAM Batch protocol is to use the normal routines
  440. for sending and receiving XMODEM packets in a layered fashion similar to
  441. packet switching methods.
  442.  
  443. Why was it necessary to design a new batch protocol when one already
  444. existed in MODEM7?  The batch file mode used by MODEM7 is unsuitable
  445. because it does not permit full pathnames, file length, file date, or any
  446. other attribute information to be transmitted.  Such a restrictive design,
  447. hastily implemented with only CP/M in mind, would not have permitted
  448. extensions to current areas of personal computing such as Unix, DOS, and
  449. object oriented systems.
  450.  
  451. As in the case of single a file transfer, the receiver initiates batch
  452. file transmission by sending a "C" character (for CRC-16).
  453.  
  454. The sender opens the first file and sends packet number 0 with the
  455.  
  456.  
  457. XMODEM/YMODEM Protocol Reference                                         7
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.                                   - 8 -
  467. XMODEM Protocol Enhancements                                     Chapter 3
  468.  
  469.  
  470. following information.1
  471.  
  472. Only the pathname (file name) part is required for batch transfers.
  473.  
  474. To maintain upwards compatibility, all unused bytes in packet 0 must be
  475. set to null.
  476.  
  477. Pathname The pathname (conventionally, the file name) is sent as a null
  478.      terminated ASCII string.  This is the filename format used by the
  479.      handle oriented MSDOS(TM) functions and C library fopen functions.
  480.      An assembly language example follows:
  481.                               DB      'foo.bar',0
  482.      No spaces are included in the pathname.  Normally only the file name
  483.      stem (no directory prefix) is transmitted unless the sender has
  484.      selected YAM's f option to send the full pathname.  The source drive
  485.      (A:, B:, etc.) is not sent.
  486.  
  487.      Filename Considerations:
  488.  
  489.         + File names should be translated to lower case unless the sending
  490.           system supports upper/lower case file names.  This is a
  491.           convenience for users of systems (such as Unix) which store
  492.           filenames in upper and lower case.
  493.  
  494.         + The receiver should accommodate file names in lower and upper
  495.           case.
  496.  
  497.         + The rb(1) program on Unix systems normally translates the
  498.           filename to lower case unless one or more letters in the
  499.           filename are already in lower case.
  500.  
  501.         + When transmitting files between different operating systems,
  502.           file names must be acceptable to both the sender and receiving
  503.           operating systems.
  504.      If directories are included, they are delimited by /; i.e.,
  505.      "subdir/foo" is acceptable, "subdir\foo" is not.
  506.  
  507. Length The file length and each of the succeeding fields are optional.2
  508.      The length field is stored in the packet as a decimal string.  The
  509.      file length does not include any CPMEOF (^Z) characters used to pad
  510.      the last packet.
  511.  
  512.      If the file being transmitted is growing during transmission, the
  513.  
  514.  
  515. __________
  516.  
  517.  1. Only the data part of the packet is described here.
  518.  
  519.  2. Fields may not be skipped.
  520.  
  521.  
  522.  
  523. 8                           Vsn 13.09 05-05-85              TurboDial 1.02
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.                                   - 9 -
  533. Chapter 3                                     XMODEM Protocol Enhancements
  534.  
  535.  
  536.      length field should be set to at least the final expected file
  537.      length, or not sent.
  538.  
  539.      The receiver stores the specified number of characters, discarding
  540.      any padding added by the sender to fill up the last packet.
  541.  
  542. Mod Date A single space separates the modification date from the file
  543.      length.
  544.  
  545.      The mod date is optional, and the filename and length may be sent
  546.      without requiring the mod date to be sent.
  547.  
  548.      The mod date is sent as an octal number giving the time the contents
  549.      of the file were last changed measured in seconds from Jan 1 1970
  550.      Universal Coordinated Time (GMT).  A date of 0 implies the
  551.      modification date is unknown and should be left as the date the file
  552.      is received.
  553.  
  554.      This standard format was chosen to eliminate ambiguities arising from
  555.      transfers between different time zones.
  556.  
  557.      Two Microsoft blunders complicate the use of modification dates in
  558.      file transfers with MSDOS(TM) systems.  The first is the lack of
  559.      timezone standardization in MS-DOS.  A file's creation time can not
  560.      be known unless the timezone of the system that happened to write the
  561.      file3 is known.  Unix solved this problem (for planet Earth, anyway)
  562.      by stamping files with Universal Time (GMT).  Microsoft would have to
  563.      include the timezone of origin in the directory entries, but does
  564.      not.  YAM gets around this problem by using the z parameter which is
  565.      set to the number of minutes local time lags GMT.  For files known to
  566.      originate from a different timezone, the -zT option may be used use T
  567.      as the timezone for an individual file transfer.
  568.  
  569.      The second problem is the lack of a separate file creation date in
  570.      DOS.  Since some backup schemes used with DOS rely on the file
  571.      creation date to select files to be copied to the archive, back-
  572.      dating the file modification date could interfere with the safety of
  573.      the transferred files.  For this reason, Professional-YAM does not
  574.      modify the date of received files with the header information unless
  575.      the d parameter is non zero.
  576.  
  577.  
  578. Mode A single space separates the file mode from the modification date.
  579.      The file mode is stored as an octal string.  Unless the file
  580.      originated from a Unix system, the file mode is set to 0.  rb(1)
  581.  
  582.  
  583. __________
  584.  
  585.  3. Not necessarily that of the transmitting system!
  586.  
  587.  
  588.  
  589. XMODEM/YMODEM Protocol Reference                                         9
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.                                   - 10 -
  599. XMODEM Protocol Enhancements                                     Chapter 3
  600.  
  601.  
  602.      checks the file mode for the 0x8000 bit which indicates a Unix type
  603.      regular file.  Files with the 0x8000 bit set are assumed to have been
  604.      sent from another Unix (or similar) system which uses the same file
  605.      conventions.  Such files are not translated in any way.
  606.  
  607.  
  608. Serial Number A single space separates the serial number from the file
  609.      mode.  The serial number of the transmitting program is stored as an
  610.      octal string.  Programs which do not have a serial number should omit
  611.      this field, or set it to 0.  The receiver's use of this field is
  612.      optional.
  613.  
  614. The rest of the packet is set to nulls.  This is essential to preserve
  615. upward compatibility.4 After the filename packet has been received, it is
  616. ACK'ed if the write open is successful.  The receiver then initiates
  617. transfer of the file contents according to the standard XMODEM/CRC
  618. protocol.  If the file cannot be opened for writing, the receiver cancels
  619. the transfer with CAN characters as described above.
  620.  
  621. After the file contents have been transmitted, the receiver again asks for
  622. the next pathname.  Transmission of a null pathname terminates batch file
  623. transmission.  Note that transmission of no files is not necessarily an
  624. error.  This is possible if none of the files requested of the sender
  625. could be opened for reading.
  626.  
  627. In batch transmission, the receiver automatically requests CRC-16.
  628.  
  629. The Unix programs sb(1) and rb(1) included in the source code file
  630. RBSB.QQQ (rbsb.sh) should answer questions about YAM's batch protocol.
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647. __________
  648.  
  649.  4. If, perchance, this information extends beyond 128 bytes (possible
  650.     with Unix 4.2 BSD extended file names), the packet should be sent as a
  651.     1k packet as described above.
  652.  
  653.  
  654.  
  655. 10                          Vsn 13.09 05-05-85              TurboDial 1.02
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.                                   - 11 -
  665. Chapter 4                                         Xmodem Protocol Overview
  666.  
  667.  
  668.             Figure 3.  Batch Transmission Session
  669.             SENDER                                  RECEIVER
  670.                                                     "sb foo.*"
  671.             "sending in batch mode etc."
  672.                                                     C
  673.             SOH 00 FF foo.c NUL[123] CRC CRC
  674.                                                     ACK
  675.                                                     C
  676.             SOH 01 FE Data[128] CRC CRC
  677.                                                     ACK
  678.             SOH 02 FD Data[1024] CRC CRC
  679.                                                     ACK
  680.             SOH 03 FC Data[128] CRC CRC
  681.                                                     ACK
  682.             SOH 04 FB Data[100] CPMEOF[28] CRC CRC
  683.                                                     ACK
  684.             EOT
  685.                                                     ACK
  686.                                                     C
  687.             SOH 00 FF NUL[128] CRC CRC
  688.                                                     ACK
  689.  
  690.        Figure 4.  Filename packet transmitted by sb
  691.  
  692.                     -rw-r--r--  6347 Jun 17 1984 20:34 bbcsched.txt
  693.  
  694.        00 0100FF62 62637363 6865642E 74787400   |...bbcsched.txt.|
  695.        10 36333437 20333331 34373432 35313320   |6347 3314742513 |
  696.        20 31303036 34340000 00000000 00000000   |100644..........|
  697.        30 00000000 00000000 00000000 00000000
  698.        80 000000CA 56
  699.  
  700. 4.  XMODEM PROTOCOL OVERVIEW
  701.  
  702. 8/9/82 by Ward Christensen.
  703.  
  704. I will maintain a master copy of this.  Please pass on changes or
  705. suggestions via CBBS/Chicago at (312) 545-8086, CBBS/CPMUG (312) 849-1132
  706. or by voice at (312) 849-6279.
  707.  
  708. 4.1  Definitions
  709.  
  710.   <soh> 01H
  711.   <eot> 04H
  712.   <ack> 06H
  713.   <nak> 15H
  714.   <can> 18H
  715.   <C>   43H
  716.  
  717.  
  718.  
  719.  
  720.  
  721. XMODEM/YMODEM Protocol Reference                                        11
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.                                   - 12 -
  731. Xmodem Protocol Overview                                         Chapter 4
  732.  
  733.  
  734. 4.2  Transmission Medium Level Protocol
  735.  
  736. Asynchronous, 8 data bits, no parity, one stop bit.
  737.  
  738. The protocol imposes no restrictions on the contents of the data being
  739. transmitted.  No control characters are looked for in the 128-byte data
  740. messages.  Absolutely any kind of data may be sent - binary, ASCII, etc.
  741. The protocol has not formally been adopted to a 7-bit environment for the
  742. transmission of ASCII-only (or unpacked-hex) data , although it could be
  743. simply by having both ends agree to AND the protocol-dependent data with
  744. 7F hex before validating it.  I specifically am referring to the checksum,
  745. and the block numbers and their ones- complement.
  746.  
  747. Those wishing to maintain compatibility of the CP/M file structure, i.e.
  748. to allow modemming ASCII files to or from CP/M systems should follow this
  749. data format:
  750.  
  751.    + ASCII tabs used (09H); tabs set every 8.
  752.  
  753.    + Lines terminated by CR/LF (0DH 0AH)
  754.  
  755.    + End-of-file indicated by ^Z, 1AH.  (one or more)
  756.  
  757.    + Data is variable length, i.e. should be considered a continuous
  758.      stream of data bytes, broken into 128-byte chunks purely for the
  759.      purpose of transmission.
  760.  
  761.    + A CP/M "peculiarity": If the data ends exactly on a 128-byte
  762.      boundary, i.e. CR in 127, and LF in 128, a subsequent sector
  763.      containing the ^Z EOF character(s) is optional, but is preferred.
  764.      Some utilities or user programs still do not handle EOF without ^Zs.
  765.  
  766.    + The last block sent is no different from others, i.e.  there is no
  767.      "short block".
  768.  
  769.               Figure 5.  XMODEM Message Block Level Protocol
  770.  
  771.       Each block of the transfer looks like:
  772.      <SOH><blk #><255-blk #><--128 data bytes--><cksum>
  773.          in which:
  774.      <SOH>       = 01 hex
  775.      <blk #>     = binary number, starts at 01 increments by 1, and
  776.                    wraps 0FFH to 00H (not to 01)
  777.      <255-blk #> = blk # after going thru 8080 "CMA" instr, i.e.
  778.                    each bit complemented in the 8-bit block number.
  779.                    Formally, this is the "ones complement".
  780.      <cksum>     = the sum of the data bytes only.  Toss any carry.
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787. 12                          Vsn 13.09 05-05-85              TurboDial 1.02
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.                                   - 13 -
  797. Chapter 4                                         Xmodem Protocol Overview
  798.  
  799.  
  800. 4.3  File Level Protocol
  801.  
  802. 4.3.1  Common_to_Both_Sender_and_Receiver
  803. All errors are retried 10 times.  For versions running with an operator
  804. (i.e. NOT with XMODEM), a message is typed after 10 errors asking the
  805. operator whether to "retry or quit".
  806.  
  807. Some versions of the protocol use <can>, ASCII ^X, to cancel transmission.
  808. This was never adopted as a standard, as having a single "abort" character
  809. makes the transmission susceptible to false termination due to an <ack>
  810. <nak> or <soh> being corrupted into a <can> and cancelling transmission.
  811.  
  812. The protocol may be considered "receiver driven", that is, the sender need
  813. not automatically re-transmit, although it does in the current
  814. implementations.
  815.  
  816.  
  817. 4.3.2  Receive_Program_Considerations
  818. The receiver has a 10-second timeout.  It sends a <nak> every time it
  819. times out.  The receiver's first timeout, which sends a <nak>, signals the
  820. transmitter to start.  Optionally, the receiver could send a <nak>
  821. immediately, in case the sender was ready.  This would save the initial 10
  822. second timeout.  However, the receiver MUST continue to timeout every 10
  823. seconds in case the sender wasn't ready.
  824.  
  825. Once into a receiving a block, the receiver goes into a one-second timeout
  826. for each character and the checksum.  If the receiver wishes to <nak> a
  827. block for any reason (invalid header, timeout receiving data), it must
  828. wait for the line to clear.  See "programming tips" for ideas
  829.  
  830. Synchronizing:  If a valid block number is received, it will be: 1) the
  831. expected one, in which case everything is fine; or 2) a repeat of the
  832. previously received block.  This should be considered OK, and only
  833. indicates that the receivers <ack> got glitched, and the sender re-
  834. transmitted; 3) any other block number indicates a fatal loss of
  835. synchronization, such as the rare case of the sender getting a line-glitch
  836. that looked like an <ack>.  Abort the transmission, sending a <can>
  837.  
  838.  
  839. 4.3.3  Sending_program_considerations
  840. While waiting for transmission to begin, the sender has only a single very
  841. long timeout, say one minute.  In the current protocol, the sender has a
  842. 10 second timeout before retrying.  I suggest NOT doing this, and letting
  843. the protocol be completely receiver-driven.  This will be compatible with
  844. existing programs.
  845.  
  846. When the sender has no more data, it sends an <eot>, and awaits an <ack>,
  847. resending the <eot> if it doesn't get one.  Again, the protocol could be
  848. receiver-driven, with the sender only having the high-level 1-minute
  849. timeout to abort.
  850.  
  851.  
  852.  
  853. XMODEM/YMODEM Protocol Reference                                        13
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.                                   - 14 -
  863. Xmodem Protocol Overview                                         Chapter 4
  864.  
  865.  
  866. Here is a sample of the data flow, sending a 3-block message.  It includes
  867. the two most common line hits - a garbaged block, and an <ack> reply
  868. getting garbaged.  <xx> represents the checksum byte.
  869.  
  870.  
  871.        Figure 6.  Data flow including Error Recovery
  872.  
  873.        SENDER                                  RECEIVER
  874.                                        times out after 10 seconds,
  875.                                <---            <nak>
  876.        <soh> 01 FE -data- <xx> --->
  877.                                <---            <ack>
  878.        <soh> 02 FD -data- xx   --->    (data gets line hit)
  879.                                <---            <nak>
  880.        <soh> 02 FD -data- xx   --->
  881.                                <---            <ack>
  882.        <soh> 03 FC -data- xx   --->
  883.           (ack gets garbaged)  <---            <ack>
  884.        <soh> 03 FC -data- xx   --->            <ack>
  885.        <eot>                   --->
  886.                                <---            <ack>
  887.  
  888. 4.4  Programming Tips
  889.  
  890.    + The character-receive subroutine should be called with a parameter
  891.      specifying the number of seconds to wait.  The receiver should first
  892.      call it with a time of 10, then <nak> and try again, 10 times.
  893.  
  894.      After receiving the <soh>, the receiver should call the character
  895.      receive subroutine with a 1-second timeout, for the remainder of the
  896.      message and the <cksum>.  Since they are sent as a continuous stream,
  897.      timing out of this implies a serious like glitch that caused, say,
  898.      127 characters to be seen instead of 128.
  899.  
  900.    + When the receiver wishes to <nak>, it should call a "PURGE"
  901.      subroutine, to wait for the line to clear.  Recall the sender tosses
  902.      any characters in its UART buffer immediately upon completing sending
  903.      a block, to ensure no glitches were mis- interpreted.
  904.  
  905.      The most common technique is for "PURGE" to call the character
  906.      receive subroutine, specifying a 1-second timeout,1 and looping back
  907.      to PURGE until a timeout occurs.  The <nak> is then sent, ensuring
  908.      the other end will see it.
  909.  
  910.  
  911.  
  912.  
  913. __________
  914.  
  915.  1. These times should be adjusted for use with timesharing systems.
  916.  
  917.  
  918.  
  919. 14                          Vsn 13.09 05-05-85              TurboDial 1.02
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.                                   - 15 -
  929. Chapter 4                                         Xmodem Protocol Overview
  930.  
  931.  
  932.    + You may wish to add code recommended by John Mahr to your character
  933.      receive routine - to set an error flag if the UART shows framing
  934.      error, or overrun.  This will help catch a few more glitches - the
  935.      most common of which is a hit in the high bits of the byte in two
  936.      consecutive bytes.  The <cksum> comes out OK since counting in 1-byte
  937.      produces the same result of adding 80H + 80H as with adding 00H +
  938.      00H.
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985. XMODEM/YMODEM Protocol Reference                                        15
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.                                   - 16 -
  995. Xmodem Protocol Overview                                         Chapter 5
  996.  
  997.  
  998. 5.  XMODEM/CRC Overview
  999.  
  1000. 1/13/85 by John Byrns -- CRC option.
  1001.  
  1002. Please pass on any reports of errors in this document or suggestions for
  1003. improvement to me via Ward's/CBBS at (312) 849-1132, or by voice at (312)
  1004. 885-1105.
  1005.  
  1006. The CRC used in the Modem Protocol is an alternate form of block check
  1007. which provides more robust error detection than the original checksum.
  1008. Andrew S. Tanenbaum says in his book, Computer Networks, that the CRC-
  1009. CCITT used by the Modem Protocol will detect all single and double bit
  1010. errors, all errors with an odd number of bits, all burst errors of length
  1011. 16 or less, 99.997% of 17-bit error bursts, and 99.998% of 18-bit and
  1012. longer bursts.
  1013.  
  1014. The changes to the Modem Protocol to replace the checksum with the CRC are
  1015. straight forward. If that were all that we did we would not be able to
  1016. communicate between a program using the old checksum protocol and one
  1017. using the new CRC protocol. An initial handshake was added to solve this
  1018. problem. The handshake allows a receiving program with CRC capability to
  1019. determine whether the sending program supports the CRC option, and to
  1020. switch it to CRC mode if it does. This handshake is designed so that it
  1021. will work properly with programs which implement only the original
  1022. protocol. A description of this handshake is presented in section 10.
  1023.  
  1024.   Figure 7.  Message Block Level Protocol, CRC mode
  1025.  
  1026.   Each block of the transfer in CRC mode looks like:
  1027.  
  1028.   <SOH><blk #><255-blk #><--128 data bytes--><CRC hi><CRC lo>
  1029.       in which:
  1030.   <SOH>             = 01 hex
  1031.   <blk #>     = binary number, starts at 01 increments by 1, and
  1032.                 wraps 0FFH to 00H (not to 01)
  1033.   <255-blk #> = ones complement of blk #.
  1034.   <CRC hi>    = byte containing the 8 hi order coefficients of the CRC.
  1035.   <CRC lo>    = byte containing the 8 lo order coefficients of the CRC.
  1036.                 See the next section for CRC calculation.
  1037.  
  1038. 5.1  CRC Calculation
  1039.  
  1040. 5.1.1  Formal_Definition
  1041. To calculate the 16 bit CRC the message bits are considered to be the
  1042. coefficients of a polynomial. This message polynomial is first multiplied
  1043. by X^16 and then divided by the generator polynomial (X^16 + X^12 + X^5 +
  1044. 1) using modulo two arithemetic. The remainder left after the division is
  1045. the desired CRC. Since a message block in the Modem Protocol is 128 bytes
  1046. or 1024 bits, the message polynomial will be of order X^1023. The hi order
  1047. bit of the first byte of the message block is the coefficient of X^1023 in
  1048. the message polynomial.  The lo order bit of the last byte of the message
  1049.  
  1050.  
  1051. 16                          Vsn 13.09 05-05-85              TurboDial 1.02
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.                                   - 17 -
  1061. Chapter 5                                         Xmodem Protocol Overview
  1062.  
  1063.  
  1064. block is the coefficient of X^0 in the message polynomial.
  1065.  
  1066.  
  1067.    Figure 8.  Example of CRC Calculation written in C
  1068.  
  1069.    /*
  1070.     * This function calculates the CRC used by the XMODEM/CRC Protocol
  1071.     * The first argument is a pointer to the message block.
  1072.     * The second argument is the number of bytes in the message block.
  1073.     * The function returns an integer which contains the CRC.
  1074.     * The low order 16 bits are the coefficients of the CRC.
  1075.     */
  1076.  
  1077.    int calcrc(ptr, count)
  1078.    char *ptr;
  1079.    int count;
  1080.    {
  1081.        int crc, i;
  1082.  
  1083.        crc = 0;
  1084.        while(--count >= 0) {
  1085.            crc = crc ^ (int)*ptr++ << 8;
  1086.            for(i = 0; i < 8; ++i)
  1087.                if(crc & 0x8000)
  1088.                    crc = crc << 1 ^ 0x1021;
  1089.                else
  1090.                    crc = crc << 1;
  1091.            }
  1092.        return (crc & 0xFFFF);
  1093.    }
  1094.  
  1095. 5.2  CRC File Level Protocol Changes
  1096.  
  1097. 5.2.1  Common_to_Both_Sender_and_Receiver
  1098. The only change to the File Level Protocol for the CRC option is the
  1099. initial handshake which is used to determine if both the sending and the
  1100. receiving programs support the CRC mode. All Modem Programs should support
  1101. the checksum mode for compatibility with older versions.  A receiving
  1102. program that wishes to receive in CRC mode implements the mode setting
  1103. handshake by sending a <C> in place of the initial <nak>.  If the sending
  1104. program supports CRC mode it will recognize the <C> and will set itself
  1105. into CRC mode, and respond by sending the first block as if a <nak> had
  1106. been received. If the sending program does not support CRC mode it will
  1107. not respond to the <C> at all. After the receiver has sent the <C> it will
  1108. wait up to 3 seconds for the <soh> that starts the first block. If it
  1109. receives a <soh> within 3 seconds it will assume the sender supports CRC
  1110. mode and will proceed with the file exchange in CRC mode. If no <soh> is
  1111. received within 3 seconds the receiver will switch to checksum mode, send
  1112. a <nak>, and proceed in checksum mode. If the receiver wishes to use
  1113. checksum mode it should send an initial <nak> and the sending program
  1114. should respond to the <nak> as defined in the original Modem Protocol.
  1115.  
  1116.  
  1117. XMODEM/YMODEM Protocol Reference                                        17
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.                                   - 18 -
  1127. Xmodem Protocol Overview                                         Chapter 5
  1128.  
  1129.  
  1130. After the mode has been set by the initial <C> or <nak> the protocol
  1131. follows the original Modem Protocol and is identical whether the checksum
  1132. or CRC is being used.
  1133.  
  1134.  
  1135. 5.2.2  Receive_Program_Considerations
  1136. There are at least 4 things that can go wrong with the mode setting
  1137. handshake.
  1138.  
  1139.   1.  the initial <C> can be garbled or lost.
  1140.  
  1141.   2.  the initial <soh> can be garbled.
  1142.  
  1143.   3.  the initial <C> can be changed to a <nak>.
  1144.  
  1145.   4.  the initial <nak> from a receiver which wants to receive in checksum
  1146.       can be changed to a <C>.
  1147.  
  1148. The first problem can be solved if the receiver sends a second <C> after
  1149. it times out the first time. This process can be repeated several times.
  1150. It must not be repeated too many times before sending a <nak> and
  1151. switching to checksum mode or a sending program without CRC support may
  1152. time out and abort. Repeating the <C> will also fix the second problem if
  1153. the sending program cooperates by responding as if a <nak> were received
  1154. instead of ignoring the extra <C>.
  1155.  
  1156. It is possible to fix problems 3 and 4 but probably not worth the trouble
  1157. since they will occur very infrequently. They could be fixed by switching
  1158. modes in either the sending or the receiving program after a large number
  1159. of successive <nak>s. This solution would risk other problems however.
  1160.  
  1161.  
  1162. 5.2.3  Sending_Program_Considerations
  1163. The sending program should start in the checksum mode. This will insure
  1164. compatibility with checksum only receiving programs. Anytime a <C> is
  1165. received before the first <nak> or <ack> the sending program should set
  1166. itself into CRC mode and respond as if a <nak> were received. The sender
  1167. should respond to additional <C>s as if they were <nak>s until the first
  1168. <ack> is received. This will assist the receiving program in determining
  1169. the correct mode when the <soh> is lost or garbled. After the first <ack>
  1170. is received the sending program should ignore <C>s.
  1171.  
  1172.  
  1173. 5.3  Data Flow Examples with CRC Option
  1174.  
  1175. Here is a data flow example for the case where the receiver requests
  1176. transmission in the CRC mode but the sender does not support the CRC
  1177. option. This example also includes various transmission errors.  <xx>
  1178. represents the checksum byte.
  1179.  
  1180.  
  1181.  
  1182.  
  1183. 18                          Vsn 13.09 05-05-85              TurboDial 1.02
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.                                   - 19 -
  1193. Chapter 5                                         Xmodem Protocol Overview
  1194.  
  1195.  
  1196.       Figure 9.  Data Flow: Receiver has CRC Option, Sender Doesn't
  1197.  
  1198.       SENDER                                  RECEIVER
  1199.                               <---            <C>
  1200.                                       times out after 3 seconds,
  1201.                               <---            <nak>
  1202.       <soh> 01 FE -data- <xx> --->
  1203.                               <---            <ack>
  1204.       <soh> 02 FD -data- <xx> --->    (data gets line hit)
  1205.                               <---            <nak>
  1206.       <soh> 02 FD -data- <xx> --->
  1207.                               <---            <ack>
  1208.       <soh> 03 FC -data- <xx> --->
  1209.          (ack gets garbaged)  <---            <ack>
  1210.                                       times out after 10 seconds,
  1211.                               <---            <nak>
  1212.       <soh> 03 FC -data- <xx> --->
  1213.                               <---            <ack>
  1214.       <eot>                   --->
  1215.                               <---            <ack>
  1216.  
  1217. Here is a data flow example for the case where the receiver requests
  1218. transmission in the CRC mode and the sender supports the CRC option.  This
  1219. example also includes various transmission errors.  <xxxx> represents the
  1220. 2 CRC bytes.
  1221.  
  1222.            Figure 10.  Receiver and Sender Both have CRC Option
  1223.  
  1224.      SENDER                                    RECEIVER
  1225.                                <---            <C>
  1226.      <soh> 01 FE -data- <xxxx> --->
  1227.                                <---            <ack>
  1228.      <soh> 02 FD -data- <xxxx> --->    (data gets line hit)
  1229.                                <---            <nak>
  1230.      <soh> 02 FD -data- <xxxx> --->
  1231.                                <---            <ack>
  1232.      <soh> 03 FC -data- <xxxx> --->
  1233.         (ack gets garbaged)    <---            <ack>
  1234.                                        times out after 10 seconds,
  1235.                                <---            <nak>
  1236.      <soh> 03 FC -data- <xxxx> --->
  1237.                                <---            <ack>
  1238.      <eot>                     --->
  1239.                                <---            <ack>
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249. XMODEM/YMODEM Protocol Reference                                        19
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.                                   - 20 -
  1259. Xmodem Protocol Overview                                         Chapter 5
  1260.  
  1261.  
  1262. Technical questions about Professional-YAM and requests for evaluation
  1263. copies for magazine reviews may be directed to:
  1264.      Chuck Forsberg
  1265.      Omen Technology Inc
  1266.      17505-V Sauvie Island Road
  1267.      Portland Oregon 97231
  1268.      Voice: 503-621-3406
  1269.      Modem: 503-621-3746 Speed: 1200,300
  1270.      Compuserve: 70715,131
  1271.      Source: TCE022
  1272. More information about Professional-YAM may be obtained by calling
  1273. Telegodzilla at 503-621-3746.  Hit RETURNs for baud rate detection.
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315. 20                          Vsn 13.09 05-05-85              TurboDial 1.02
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.                                  CONTENTS
  1329.  
  1330.  
  1331. 1.  TOWER OF BABEL ??.................................................   2
  1332.     1.1  Some Messages from the Pioneer...............................   2
  1333.  
  1334. 2.  XMODEM PROTOCOL ENHANCEMENTS......................................   5
  1335.     2.1  CAN-CAN Abort................................................   5
  1336.     2.2  CRC-16 Option................................................   5
  1337.     2.3  1024 Byte Packet Option......................................   6
  1338.  
  1339. 3.  YMODEM Batch File Transmission....................................   7
  1340.  
  1341. 4.  XMODEM PROTOCOL OVERVIEW..........................................  11
  1342.     4.1  Definitions..................................................  11
  1343.     4.2  Transmission Medium Level Protocol...........................  12
  1344.     4.3  File Level Protocol..........................................  13
  1345.     4.4  Programming Tips.............................................  14
  1346.  
  1347. 5.  XMODEM/CRC Overview...............................................  16
  1348.     5.1  CRC Calculation..............................................  16
  1349.     5.2  CRC File Level Protocol Changes..............................  17
  1350.     5.3  Data Flow Examples with CRC Option...........................  18
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.                                   - i -
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.                              LIST OF FIGURES
  1398.  
  1399.  
  1400.  Figure 1.  1024 byte Packets.........................................   6
  1401.  
  1402.  Figure 2.  Mixed 1024 and 128 byte Packets...........................   6
  1403.  
  1404.  Figure 3.  Batch Transmission Session................................  10
  1405.  
  1406.  Figure 4.  Filename packet transmitted by sb.........................  10
  1407.  
  1408.  Figure 5.  XMODEM Message Block Level Protocol.......................  12
  1409.  
  1410.  Figure 6.  Data flow including Error Recovery........................  14
  1411.  
  1412.  Figure 7.  Message Block Level Protocol, CRC mode....................  16
  1413.  
  1414.  Figure 8.  Example of CRC Calculation written in C...................  17
  1415.  
  1416.  Figure 9.  Data Flow: Receiver has CRC Option, Sender Doesn't........  18
  1417.  
  1418. Figure 10.  Receiver and Sender Both have CRC Option..................  19
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.                                   - ii -
  1449.  
  1450.  
  1451.  
  1452.  
  1453. 
  1454.  
  1455.                                   - ii -
  1456.  
  1457.  
  1458.  
  1459.  
  1460.